{template 'header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="{php echo $this->createWeburl('luck');}">指定中奖人</a></li>
</ul>
<form action="" method="post" class="form-horizontal" id="myform" role="form" enctype="multipart/form-data">
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">搜索用户:</label>
        <div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
            <input class="form-control" style="width:61%;float:left"   id="nickname" name="nickname" placeholder="请输入用户昵称" value="{$nickname}" type="text">
            <button type="button" style="margin-left: 5px;" class="btn btn-primary" id="sub">搜索</button>
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label">选择中奖人:</label>
        <div class="col-sm-7 col-lg-5 col-md-8 col-xs-12">
            <select class="form-control" id="member_id" name="member_id">
                <option value="0">请选择</option>

            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-xs-12 col-sm-3 col-md-1 control-label"></label>
        <div class="" >
            <input type="hidden" name="op" value="assign">
            <input type="hidden" id="luck_id" name="luck_id" value="{$luck_id}">
            <input type="hidden" name="luck_goods_info_id" value="{$luck_goods_info_id}">
            <input type="submit" name="submit" id="submit" value="指定" class="btn btn-primary">
        </div>
    </div>
</form>
{template 'footer'}

<script type="application/javascript">
    $(function () {

        $("#sub").click(function () {
            var url = "{php echo $this->createWeburl('getLuckParticipate', array('behavior' => $id ? 'edit' : 'add', 'luck_id' => $luck_id));}";
            var nickname = $("#nickname").val();
            var member_id = $("#member_id").val();
            var luck_id = $("#luck_id").val();
            $.post(url,{nickname:nickname,member_id:member_id,luck_id:luck_id},function(result){
                $("#member_id").empty();
                $("#member_id").append(result.info);
            });
        })

    });
    function delete_cash_explain(t) {
        $(t).parent().parent().remove();
    }
</script>